<!DOCTYPE html><html><head><title>登录</title><meta charset='utf-8'><link href='https://dn-maxiang.qbox.me/res-min/themes/marxico.css' rel='stylesheet'><style></style></head><body><div id='preview-contents' class='note-content'>
                        
                    

<h2 id="登录">登录</h2>

<blockquote>
  <p>共 <code>login</code> 一个接口</p>
</blockquote>

<hr>



<h3 id="get"><code>get</code></h3>

<p><strong>接口说明</strong> </p>

<pre class="prettyprint hljs-dark"><code class="hljs">前端登录接口。后端接到请求后，判断权限，查询并返回数据<br></code></pre>

<p><strong>URL</strong></p>

<pre class="prettyprint hljs-dark"><code class="hljs awk">http:<span class="hljs-regexp">//</span><span class="hljs-number">10.236</span>.<span class="hljs-number">44.188</span>:<span class="hljs-number">8080</span><span class="hljs-regexp">/user/</span>login.<span class="hljs-keyword">do</span><br></code></pre>

<p><strong>请求参数</strong></p>

<pre class="prettyprint hljs-dark"><code class="hljs 1c"><span class="hljs-number">1</span>. u : <span class="hljs-string">"admin"</span>                                       <span class="hljs-meta"># 用户名</span><br><span class="hljs-number">2</span>. p : <span class="hljs-string">"xxxxx"</span>                                       <span class="hljs-meta"># 密码</span><br></code></pre>

<p><strong>返回参数</strong></p>

<pre class="prettyprint hljs-dark"><code class="hljs dts">{<br><span class="hljs-symbol">    res:</span> <span class="hljs-string">"0"</span>,                <span class="hljs-meta"># 0 = 请求正常；1 = 请求异常；2 = 用户名或密码为空；3 = 用户名或密码错误；4 = 无此用户；</span><br><span class="hljs-symbol">    isAdmin:</span> true,           <span class="hljs-meta"># 是否为管理员用户</span><br><span class="hljs-symbol">    u:</span> <span class="hljs-string">"superadmin"</span>,         <span class="hljs-meta"># 用户名</span><br><span class="hljs-symbol">    p:</span> <span class="hljs-string">"xxddsdfasdfdfas"</span>     <span class="hljs-meta"># 密码md5</span><br><span class="hljs-symbol">    data:</span> [                  <span class="hljs-meta"># 权限数据</span><br>        <span class="hljs-number">1</span>: [                 <span class="hljs-meta"># 工程ID</span><br>            <span class="hljs-number">1</span>: {             <span class="hljs-meta"># 模块ID</span><br>                <span class="hljs-number">1</span>,           <span class="hljs-meta"># 页面ID</span><br>                <span class="hljs-number">2</span>            <br>            },<br>            <span class="hljs-number">2</span>: {             <span class="hljs-meta"># 模块ID</span><br>                <span class="hljs-number">3</span>,           <span class="hljs-meta"># 页面ID</span><br>                <span class="hljs-number">4</span>            <br>            },<br>        ],<br>        <span class="hljs-number">2</span>: [                 <span class="hljs-meta"># 工程ID</span><br>            <span class="hljs-number">1</span>: {             <span class="hljs-meta"># 模块ID</span><br>                <span class="hljs-number">1</span>,           <span class="hljs-meta"># 页面ID</span><br>                <span class="hljs-number">2</span>            <br>            }<br>        ]<br>    ],    <br><span class="hljs-symbol">    msg:</span> <span class="hljs-string">"error"</span>            <span class="hljs-meta"># 请求异常时返回的错误信息</span><br>}<br></code></pre></div></body></html>